<?php

namespace Database\Seeders;

use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;

class UserSeeder extends Seeder
{
    public function run()
    {
       User::factory(10)->create();
       $user = User::find(1);
       $user->name = 'Jack';
       $user->email = 'Jack@qq.com';
       $user->avatar = url('fakers/avatars/face1.jpg');
       $user->save();
       $user->assignRole('Founder');

        $user = User::find(2);
        $user->name = 'Tom';
        $user->email = 'Tom@qq.com';
        $user->avatar = url('fakers/avatars/face2.jpg');
        $user->save();
        $user->assignRole('Maintainer');

        $user = User::find(3);
        $user->name = 'Rose';
        $user->email = 'Rose@qq.com';
        $user->avatar = url('fakers/avatars/face3.jpg');
        $user->save();
    }
}
